@import '@/styles/utils.scss';

.header {
  display: flex;
  justify-content: space-between;
  height: 64px;
  border-radius: 16px 16px 0px 0px;
  align-items: center;
  padding: 0 0px;
  border-bottom: 1px solid #F1F1F1;

  :global(.dark) & {
    border-bottom: 1px solid #4C4D50;
  }

  .hl {
    padding-left: 24px;
    display: flex;
    align-items: center;
  }

  .hc1 {
    flex: 1;
    display: flex;

    padding-left: 28px;
    padding-right: 10px;
  }


  .hr {
    display: flex;
    justify-content: flex-end;
    padding-right: 24px;
  }
}


.switch {
  height: 32px;
  background: #EAEDF0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 3px;
  position: relative;
  cursor: pointer;

  :global(.dark) & {
    background: #1F2023;
  }

  .switchItem {
    width: 43px;
    height: 26px;
    border-radius: 6px;
  }

}

.slider {
  position: absolute;
  width: 43px;
  height: 26px;
  background: #fff;
  border-radius: 6px;
  transition: all 0.3s;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  line-height: 1;
  border-radius: 6px;

  &.right {
    transform: translateX(43px);
  }

  &.active {
    background: #000;
    color: #fff;
  }

  :global(.dark) & {
    background: #3F3F46;
    color: #fff;
    box-shadow: none;

    &.active {
      background: #fff;
      color: #000;
    }
  }
}

.url {
  width: 100%;
  max-width: 648px;
  height: 32px;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E0E0E0;
  color: #6B6B6B;
  display: flex;
  align-items: center;
  padding: 0 10px;
  justify-content: space-between;

  :global(.dark) & {
    background: #1F2023;
    border-color: #3F3F46;
    color: #A1A1AA;
  }

  button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #71717A;
    padding: 4px;
    transition: color 0.2s;
    line-height: 1;
    i{
      font-size: 14px;
    }

    &:hover {
      color: #18181B;
    }

    :global(.dark) & {
      color: #A1A1AA;

      &:hover {
        color: #FFFFFF;
      }
    }

    svg {
      width: 14px;
      height: 14px;
    }
  }

  .url-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    margin: 0 8px;
  }
}


.button1 {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #FFFFFF;
  padding: 0px 10px;
  min-width: 124px;
  height: 32px;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid #E3E3E3;
  font-size: 12px;
  color: #353535;

  &:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }

  &:hover {
    background: #F3F3F3;
  }


  :global(.dark) & {
    color: #d1d5db;
    border-color: #3F4245;
    background-color: transparent;

    &:hover {
      background: #313234;
    }
  }
}

.urlButtons {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.iconButton {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  border-radius: 100%;
  color: #000000;
  border: 1px solid transparent;
  line-height: 1;

  &:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }

  &:hover {
    background: #F3F3F3;
    color: #18181B;
  }

  i {
    font-size: 16px;
  }

  :global(.dark) & {
    color: #d1d5db;
    background-color: transparent;

    &:hover {
      background-color: #313234;
    }
  }


}


.settingsButton {
  // all: unset;
  width: 32px;
  height: 32px;
  cursor: pointer;
  padding: 8px;
  border-radius: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  transition: all 0.2s ease;

  &:hover {
    background-color: #F3F3F3;
  }

  :global(.dark) & {
    color: #fff;

    &:hover {
      background-color: #313234;
    }
  }
}

.title{
  max-width: 301px;

  font-weight: 600;
  font-size: 16px;
  color: #353535;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 16px;

  :global(.dark) & {
    color: #fff;
  }

  i{
    font-weight: 400;
    font-size: 15px;
    margin-right: 10px;
  }
}

// Save Point Dropdown Styles
.savePointButton {
  all: unset;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  height: 30px;
  // line-height: 1;
  background-color: #151515;
  color: white;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  border: 1px solid transparent;
  
  &:hover {
    background-color: #2C2C2C;
  }
  
  :global(.dark) & {
    background-color: #313234;
    border: 1px solid #3F3F46;
    
    &:hover {
      background-color: #3F4043;
    }
  }
}

.savePointsDropdown {
  min-width: 300px;
  max-height: 300px;
  overflow-y: auto;
  background-color: white;
  border-radius: 16px;
  padding: 8px 0;
  box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2);
  animation-duration: 400ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  border: 1px solid #E3E3E3;
  
  :global(.dark) & {
    background-color: #292A2E;
    border: 1px solid #3F3F46;
    box-shadow: 0px 10px 38px -10px rgba(0, 0, 0, 0.5);
  }
}

.savePointItem {
  padding: 12px 16px;
  cursor: pointer;
  outline: none;
  border-left: 3px solid transparent;
  transition: background-color 0.2s;
  
  &:hover {
    background-color: #F5F5F5;
  }
  
  &.savePointItemActive {
    border-left-color: #151515;
    background-color: #F5F5F5;
  }
  
  :global(.dark) & {
    &:hover {
      background-color: #313234;
    }
    
    &.savePointItemActive {
      border-left-color: #E4E4E7;
      background-color: #313234;
    }
  }
}

.savePointHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.savePointName {
  font-weight: 500;
  font-size: 14px;
  color: #151515;
  
  :global(.dark) & {
    color: #E4E4E7;
  }
}

.savePointDate {
  font-size: 12px;
  color: #71717A;
  
  :global(.dark) & {
    color: #A1A1AA;
  }
}

.savePointDescription {
  font-size: 12px;
  color: #71717A;
  line-height: 1.5;
  
  :global(.dark) & {
    color: #A1A1AA;
  }
}

.actionButton {
  all: unset;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 30px;
  font-size: 14px;
  color: #333333;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #FFFFFF;
  border: 1px solid #E6E6E6;
  margin-right: 10px;
  min-width: 120px;
  justify-content: center;
  font-weight: 500;
  
  i {
    font-size: 16px;
  }

  &:hover {
    background-color: #F5F5F5;
    border-color: #D1D1D1;
  }
  
  :global(.dark) & {
    color: #E4E4E7;
    background-color: #313234;
    border: 1px solid #3F3F46;

    &:hover {
      background-color: #3F4043;
      border-color: #52525B;
    }
    
    &.actionButtonActive {
      background-color: #151515;
      color: white;
      border-color: #151515;
      
      &:hover {
        background-color: #151515;
        border-color: #151515;
      }
    }
  }
}